package EvaTCPL;

public class EvaTCPLudist extends EvaTCPLaexpression
{

  public EvaTCPLudist(EvaTCPLaexpression e1, EvaTCPLaexpression e2)
    {
      super(e1,e2);
    }
  
  /** Evaluate this arithmetic expression. */
  public double evaluate()
    {
      double s0, s1;
      s0 = sons[0].evaluate();
      s1 = sons[1].evaluate();
      
      return (s1-s0)*Math.random()+s0;
    }
  
  public String toString()
    {
      return "udist("+sons[0].toString()+", "+sons[1].toString()+")";
    }
}
